/*
 * @Author: 17607638761 zoujiaying@yuandian.com
 * @Date: 2023-07-28 09:43:35
 * @LastEditors: 17607638761 zoujiaying@yuandian.com
 * @LastEditTime: 2023-08-04 16:39:30
 * @FilePath: \bpm-ui\src\api\management\packagesAnalysis\originalPacketDisplay.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*原始数据包展示*/
import request from '@/utils/request';

// 原始数据包展示与分析
export function getFilterBusinessData(query: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/filterBusinessData',
		method: 'post',
		data: query,
	});
}

// 查询原始包捕获规则数据
export function findName(): ApiPromise<ApiResponse> {
	return request({
		url: '/management/metadata/probe/capture/config/findName',
		method: 'get',
	});
}

// 批量删除
export function deleteByIds(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/filterBusinessData/delete/' + ids,
		method: 'delete',
	});
}

// 下载
export function downloadAll(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/filterBusinessData/excelTemplate-all/' + data,
		method: 'get',
		responseType: 'blob',
	});
}
// 下载
export function downloadOne(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/filterBusinessData/excelTemplate-one/' + data,
		method: 'get',
		responseType: 'blob',
	});
}

// 根据ID查询包体详情
export function filterDetails(id: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/filterBusinessData/' + id,
		method: 'get',
	});
}

// 根据ID查询包体详情
export function queryIndexExtractRuleByresourceCode(resourceCode: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/indexExtractRule/' + resourceCode,
		method: 'get',
	});
}

// 根据ID查询包体详情
export function addIndexExtractRule(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/indexExtractRule',
		method: 'post',
		data,
	});
}
